﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using Shanfree.Framework.Utility;
using Shanfree.SharpMovie.BLL;
using Shanfree.SharpMovie.Model;

public partial class Pages_CommentList : BasePage
{
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            if (!IsPostBack)
            {
                BindList();
                //Master.UserInfoInitial(userID);
            }

        }
        catch (Exception ex)
        {
            LogEntry.Log.Write(ex.ToString(), EventLogEntryType.Error, LogSourceType.一般错误);
            ShowMsg(ex.Message);
        }
    }
     
    

    protected void pGrid_OnClick(object sender, EventArgs e)
    {
        try
        {
            BindList();
        }
        catch (Exception exc)
        {
            ShowMsg(exc.Message);
            LogEntry.Log.Write(exc.ToString(), EventLogEntryType.Error, LogSourceType.一般错误);
        }
    }
    private void BindList()
    {
        string userID = this.CurrentUser.ID;
        int pageSize = pGrid.CrossPageNum;
        int pageIndex = pGrid.CurrentPageIndex;

        IList<CommentInfo> cList = new Comment().GetList(userID, pageSize, pageIndex);
        dlComments.DataSource = cList;
        dlComments.DataBind();
    }
    protected void mType_MenuItemClick(object sender, System.Web.UI.WebControls.MenuEventArgs e)
    {

    }
}
